package lagouserviceuser.controller;

import com.lagou.edu.CodeService;
import org.apache.dubbo.config.annotation.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class AccountController {

    @Reference
    private CodeService codeService;

    @GetMapping(value = "/register")
    public Integer register(){
        return codeService.createCodeAndSendEmail();
    }

}
